const express = require('express')
const compression = require('compression')
const app = express()

/* const https = requrie('https')
const fs = require('fs')
const options = {
    cert:fs.readFileSync('./full_chain.pem'),
    key:fs.readFileSync('./private.key')
} */
// 一定要把这行代码，写到静态资源托管之前
app.use(compression())
app.use(express.static('./dist'))
app.listen(80,()=>{
    console.log('server running http://127.0.0.1')
})

// https.createServer(options,app).listen(443)